<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<script type="text/javascript">

    $(function () {
        var entityManagement = new EntityManagement();
        entityManagement.entityName = "权限选择";
        entityManagement.entityPath = "/auth/authority";
        entityManagement.entityTable = "management";
        $("#" + entityManagement.entityTable).flexigrid({
            url:'list.action',
            dataType:'json',
            colModel:[
                {display:'权限ID', name:'id', width:100, sortable:true, align:'center', hide:false},
                {display:'权限名称', name:'name', width:200, sortable:true, align:'center'},
                {display:'权限描述', name:'description', width:100, sortable:true, align:'center'}
            ],
            buttons:[
                {name:'选择', bclass:'edit', onpress:action, id:'select'},
                {separator:true}
            ],
            searchitems:[
                {display:'ID', name:'filter_EQL_id', isdefault:true},
                {display:'授权名称', name:'filter_LIKES_name', isdefault:true}
            ],
            sortname:"id",
            sortorder:"asc",
            usepager:true,
            title:'',
            useRp:true,
            checkbox:true, // 是否要多选框
            rowId:'id', // 多选框绑定行的id
            rp:40,
            showTableToggleBtn:true,
            width:'auto',
            minwidth:10,
            height:200
        });

        //管理操作
        function action(com, grid) {
            if(BossUtils.checkSingleRecord(com, grid)) {
                row_id = BossUtils.getCurrentRecord(com, grid);
            }
        }
    });
</script>